.crawler-btn {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  padding: 10px 15px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  z-index: 2147483647; /* 最高层级 */
  font-size: 14px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  opacity: 0.9;
  user-select: none;
  -webkit-user-select: none;
}

.crawler-btn:hover {
  opacity: 1;
  background-color: #45a049;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.crawler-drawer {
  position: fixed;
  right: 0;
  top: 0;
  width: 0;
  height: 100vh;
  background-color: white;
  box-shadow: -2px 0 5px rgba(0,0,0,0.1);
  transition: width 0.3s ease;
  z-index: 9999;
  overflow: hidden;
}

.crawler-drawer.open {
  width: 400px;
}

.drawer-content {
  width: 400px;
  height: 100%;
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.tab-container {
  display: flex;
  border-bottom: 1px solid #ddd;
  margin-bottom: 20px;
}

.tab {
  padding: 10px 20px;
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  flex: 1;
  text-align: center;
}

.tab.active {
  border-bottom: 2px solid #4CAF50;
  color: #4CAF50;
}

.resource-container {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 20px;
}

.resource-item {
  display: flex;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #eee;
  gap: 10px;
}

.resource-preview {
  width: 80px;
  height: 80px;
  object-fit: cover;
  flex-shrink: 0;
  border-radius: 4px;
  background-color: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #666;
  text-align: center;
}

.resource-info {
  flex: 1;
  min-width: 0; /* 确保文本可以正确截断 */
}

.resource-name {
  margin: 0 0 5px 0;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resource-size {
  font-size: 12px;
  color: #666;
}

.download-btn {
  padding: 5px 15px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 12px;
  transition: background-color 0.2s;
}

.download-btn:hover {
  background-color: #45a049;
}

.download-all-btn {
  width: 100%;
  padding: 12px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
  margin-top: auto; /* 将按钮推到底部 */
}

.download-all-btn:hover {
  background-color: #45a049;
}

/* 添加加载动画 */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: #666;
}

.loading::after {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid #4CAF50;
  border-top-color: transparent;
  border-radius: 50%;
  margin-left: 10px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
} 